// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import fetch from './utils/fetch'
import Blob from '@/excel/Blob'
// import echarts from 'echarts'

// Vue.prototype.$echarts = echarts
const { export_json_to_excel } = require('@/excel/Export2Excel');

Vue.prototype.$Blob = Blob
Vue.prototype.$export_json_to_excel = export_json_to_excel

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.prototype.$fetch = fetch

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
var instance = axios.create({
  baseURL: '',
  timeout: 5000,
  headers: { 'Content-Type': 'multipart/form-data' }
})

Vue.prototype.axios = axios
Vue.prototype.instance = instance
